namespace MvcEnrollment.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class newPriceMIg : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.Prices", "monthDuration", c => c.Int());
            AddColumn("dbo.Prices", "monthDeposit", c => c.Decimal(precision: 18, scale: 2));
            AddColumn("dbo.Prices", "weekDuration", c => c.Int());
            AddColumn("dbo.Prices", "weekDeposit", c => c.Decimal(precision: 18, scale: 2));
            AddColumn("dbo.Prices", "courseID_ID", c => c.Int());
            AddForeignKey("dbo.Prices", "courseID_ID", "dbo.Courses", "ID");
            CreateIndex("dbo.Prices", "courseID_ID");
            DropColumn("dbo.Prices", "courseID");
        }
        
        public override void Down()
        {
            AddColumn("dbo.Prices", "courseID", c => c.Int(nullable: false));
            DropIndex("dbo.Prices", new[] { "courseID_ID" });
            DropForeignKey("dbo.Prices", "courseID_ID", "dbo.Courses");
            DropColumn("dbo.Prices", "courseID_ID");
            DropColumn("dbo.Prices", "weekDeposit");
            DropColumn("dbo.Prices", "weekDuration");
            DropColumn("dbo.Prices", "monthDeposit");
            DropColumn("dbo.Prices", "monthDuration");
        }
    }
}
